<?php
//pr($address);
//exit;
?>

<div class="yourAccMain">
    <h6>Select a shipping address</h6>
    <div class="yourAccMain_L_in">
        <?php
        if (isset($address) and ($address) and sizeof($address)) {
            ?>
            <div class="yourAccMain_L_in_L">
                <h2>Address Book</h2>
            </div>
            <div class="yourAccMain_L_in_R">
                <?php
                foreach ($address as $addres) {
                    ?>
                    <div class="def_div f_left">
                        <div class="acc_form_2 ">
                            <div class="seller_right_pro"> <span class="text_form1"> <b><?php echo $addres['Address']['name']; ?> </b><br>
        <?php echo $addres['Address']['add1']; ?><br>
                                    <?php echo $addres['Address']['add2']; ?><br>
                                    <?php echo $addres['Address']['city']; ?><br>
                                    <?php echo $addres['Address']['state']; ?><br>
                                    <?php echo $addres['Address']['zip']; ?><br>
                                    Phone:
                                    <?php
                                    echo $addres['Address']['phone'];
                                    $encode_id = base64_encode($addres['Address']['id']);
                                    ?>
                                    <br>
                                </span> </div>
                        </div>
                        <div class="acc_form_1 ">
        <?php
        echo $html->link('Shipping to this Address', array('controller' => 'Paypals', 'action' => 'ProceedPay',
            'address' => $encode_id), array('class' => 'org_link f_left'));
        ?>
                        </div>
                    </div>
        <?php
    }
    ?>
            </div>
                <?php
            }
            ?>
        <div class="pad_10"></div>
        <div class="common_border1"></div>
        <div class="pad_10"></div>
        <div class="yourAccMain_L_in_L">
            <h2>Or enter a new shipping address </h2>
        </div>
<?php echo $form->create('Product', array('action' => "", 'id' => 'SellerLoginForm')) ?>
        <div class="yourAccMain_L_in_R">
            <div class="def_div f_left">
                <div class="acc_form_1">Full Name :</div>
                <div class="acc_form_2"> <?php echo $this->Form->input('Address.name', array('type' => 'text',
    'autocomplete' => 'off', 'required' => true, 'class' => 'fie1', 'label' => false)); ?> </div>
            </div>
            <div class="def_div f_left">
                <div class="acc_form_1">Address Line 1 :</div>
                <div class="acc_form_2"> <?php echo $this->Form->input('Address.add1', array('type' => 'textarea',
    'autocomplete' => 'off', 'required' => true, 'class' => 'fie1', 'label' => false)); ?> <span class="gray_comment">Street address</span> </div>
            </div>
            <div class="def_div f_left">
                <div class="acc_form_1">Address Line 2 :</div>
                <div class="acc_form_2"> <?php echo $this->Form->input('Address.add2', array('type' => 'textarea',
    'autocomplete' => 'off', 'required' => true, 'class' => 'fie1', 'label' => false)); ?> <span class="gray_comment">Suite, unit, building, floor, etc.</span> </div>
            </div>
            <div class="def_div f_left">
                <div class="acc_form_1">City/Town :</div>
                <div class="acc_form_2">
<?php
echo $this->Form->input('Address.city', array('type' => 'text',
    'autocomplete' => 'off',
    'required' => true, 'class' => 'fie1', 'label' => false));
?>
                </div>
            </div>
            <div class="def_div f_left">
                <div class="acc_form_1">Province/Region/State :</div>
                <div class="acc_form_2"> <?php echo $this->Form->input('Address.state', array('type' => 'text', 'autocomplete' => 'off', 'required' => true, 'class' => 'fie1', 'label' => false)); ?> </div>
            </div>
            <div class="def_div f_left">
                <div class="acc_form_1">Postal Code/Zip Code :</div>
                <div class="acc_form_2"> <?php echo $this->Form->input('Address.zip', array('type' => 'text', 'autocomplete' => 'off', 'required' => true, 'class' => 'fie1', 'label' => false)); ?> </div>
            </div>
            <div class="def_div f_left">
                <div class="acc_form_1">Country :</div>
                <div class="acc_form_2"> <?php
                    echo $form->input('Address.country', array('options' => $list_countries, 'value' => '',
                        'class' => 'select_count dropbox', 'label' => false, 'empty' => false));
?> </div>
            </div>
            <div class="def_div f_left">
                <div class="acc_form_1">Primary Phone :</div>
                <div class="acc_form_2"> <?php echo $this->Form->input('Address.phone', array('type' => 'text', 'autocomplete' => 'off', 'required' => true, 'class' => '', 'label' => false)); ?> </div>
            </div>
            <div class="def_div f_left">
                <div class="acc_form_1">&nbsp;</div>
                <div class="acc_form_2">
                    <input name="Submit" value="Submit" class="add2cart" type="Submit">
                </div>
            </div>
        </div>
<?php echo $form->end(); ?> </div>
</div>
<div class="pad_10">&nbsp;</div>
<div class="common_border">&nbsp;</div>
        <?php //exit; ?>
